home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / and_or.str < prev    next >
Text File  |  1991-04-12  |  1KB  |  38 lines

  1. Article 2840 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!cs.utexas.edu!yale!mintaka!ai-lab!rice-chex!bson
  3. From: bson@rice-chex.ai.mit.edu (Jan Brittenson)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: Re: 32 Bt Mant is < I need!
  6. Message-ID: <12330@life.ai.mit.edu>
  7. Date: 10 Dec 90 16:20:00 GMT
  8. References: <1990Dec10.034626.27415@cc.ic.ac.uk> <10060@jarthur.Claremont.EDU> <2667@charon.cwi.nl>
  9. Sender: news@ai.mit.edu
  10. Organization: nil
  11. Lines: 23
  12.  
  13. In article <2667@charon.cwi.nl> jurjen@cwi.nl (Jurjen NE Bos) writes:
  14.  
  15.  > The 48SX already has arbitrary-large binaries--except that it cannot
  16.  > do computations with them.  ... If only someone would write input and
  17.  > calculation routines for those long binaries...
  18.  
  19.    The HP-48 performs logical operations on strings, and since binary
  20. numbers essentially are strings with a different type prefix, all we
  21. have to do for AND, OR, XOR, NOT, is to bypass the type check:
  22.  
  23.  
  24.     #188e6 SYSEVAL        AND strings
  25.     #188f5 SYSEVAL        OR strings
  26.     #18904 SYSEVAL        XOR strings
  27.     #18961 SYSEVAL        NOT string
  28.  
  29.  
  30.    In fact, these routines can be appled to any object that is a
  31. "vector" object, i.e. a type prefix followed by a 20-bit length
  32. counting the length itself - Library data, GROB, String, and Binary.
  33.  
  34.    So I guess what need are +, -, *, /, and a few shift operations,
  35. and we're all set!
  36.  
  37.  
  38.